{{ define "main" }}

{{ $data := index site.Data site.Language.Lang }}

<!-- banner -->
{{ if $data.homepage.banner.enable }}
{{ with $data.homepage.banner }}
<section class="slider {{if .bg_overlay}}overly{{end}}" style="background-image: url('{{ .bg_image | absURL }}');">
  <div class="container">
    <div class="row">
      <div class="col-md-12">
        <div class="block">
          <h1>{{ .title | markdownify }}</h1>
          <p>{{ .content | markdownify }}</p>
          {{ if .button.enable }}
          {{ with .button }}
          <a href="{{ .link | relLangURL }}" target="_blank" class="btn btn-main animated fadeInUp">{{ .label }}</a>
          {{ end }}
          {{ end }}
        </div>
      </div>
    </div>
  </div>
</section>
{{ end }}
{{ end }}
<!-- /banner -->

{{ if $data.homepage.about.enable }}
{{ with $data.homepage.about }}
<!-- about -->
<section class="about section">
  <div class="container">
    <div class="row">
      <div class="col-md-7 col-sm-12">
        <div class="block">
          <div class="section-title">
            <h2>{{ .title | markdownify }}</h2>
            <p>{{ .description | markdownify }}</p>
          </div>
          <p>{{ .content | markdownify }}</p>
        </div>
      </div>
      <div class="col-md-5 col-sm-12">
        <div class="block">
          <img src="{{ .image | relURL }}" class="img-responsive" alt="Img">
        </div>
      </div>
    </div>
  </div>
</section>
<!-- /about -->
{{ end }}
{{ end }}

{{ if $data.homepage.portfolio.enable }}
{{ with $data.homepage.portfolio }}
<!-- portfolio -->
<section class="feature bg-2" style="background-image: url('{{ .bg_image | absURL}}')">
  <div class="container">
    <div class="row">
      <div class="col-md-6 col-md-offset-6">
        <h2 class="section-subtitle">{{ .title | markdownify }}</h2>
        {{ .content | markdownify }}
        {{ if .button.enable }}
        {{ with .button }}
        <a href="{{ .link | relLangURL }}" class="btn btn-view-works">{{ .label }}</a>
        {{ end }}
        {{ end }}
      </div>
    </div>
  </div>
</section>
<!-- /portfolio -->
{{ end }}
{{ end }}

<!-- Service -->
{{ if $data.homepage.service.enable }}
{{ partial "service.html" . }}
{{ end }}
<!-- /service -->

<!-- Call to action -->
{{ if $data.homepage.cta.enable }}
{{ partial "cta.html" . }}
{{ end }}
<!-- /Call to action -->

{{ if $data.homepage.funfacts.enable }}
{{ with $data.homepage.funfacts }}
<!-- Content Start -->
<section class="testimonial">
  <div class="container">
    <div class="row">
      <div class="section-title text-center">
        <h2>{{ .title | markdownify }}</h2>
        <p>{{ .description | markdownify }}</p>
      </div>
    </div>
    <div class="row">
      <div class="col-md-6">
        <div class="block">
          <ul class="counter-box clearfix">
            {{ range .funfact_item }}
            <li class="counter-item">
              <i class="{{ .icon }}"></i>
              <h4 class="count" data-count="{{ .count }}">0</h4>
              <span>{{ .name | markdownify }}</span>
            </li>
            {{ end }}
          </ul>
        </div>
      </div>
      <div class="col-md-5 col-md-offset-1">
        <div class="testimonial-carousel text-center">
          <div class="testimonial-slider owl-carousel">
            {{ range .testimonial_slider }}
            <div>
              <i class="ion-quote"></i>
              <p>"{{ .content | markdownify }}"</p>
              <div class="user">
                <img src="{{ .image | relURL }}" alt="client">
                <p><span>{{ .name | markdownify }}</span> {{ .designation | markdownify }}</p>
              </div>
            </div>
            {{ end }}
          </div>
        </div>
      </div>
    </div>
  </div>
</section>
{{ end}}
{{ end}}

{{ end }}